<template>
    <div class="i-tip">
        <div class="i-tip">父传子的值:{{info.like}}</div>
        <div class="i-tip">
            <el-button @click="send">传值</el-button>
        </div>
    </div>
</template>

<script setup>
import { reactive } from "vue";
const props = defineProps({
    like: {
        type: String,
        default: () => 'one'
    }
})
const emits = defineEmits(['sendvalue'])

let info = reactive({
    like: props.like
});
// 编写传参函数
function send() {
    emits("sendvalue", "今天是一个晴天")
}   
</script>

